<%= form_tag url_for({action: :update_menu_item, nav_menu_id: nav_menu.id, id: menu_item.id || '-1'}), class: "form-custom-link validate #{menu_item.new_record? ? "panel-body" : ""}" do %>
    <div class="alert alert-info"><%= raw t('.root_alert_info', default: 'You can use <b>root_url</b> as main url.') %></div>
    <div class="form-group">
        <label><%= t('camaleon_cms.admin.menus.name_link')%></label>
        <input id="external_label" class="form-control translatable required" name="external_label" value="<%= menu_item.label %>" />
    </div>
    <div class="form-group">
        <label><%= t('camaleon_cms.admin.menus.link_url')%></label>
        <input id="external_url" class="form-control translatable" name="external_url" value="<%= menu_item.url %>" />
    </div>
    <div class="form-group">
        <label><%= t('camaleon_cms.admin.menus.target', default: 'Target')%></label>
        <%= select_tag 'target', options_for_select({'_blank' => t('camaleon_cms.admin.menus.targets.blank', default: 'Blank'), '_parent' => t('camaleon_cms.admin.menus.targets.parent', default: 'Parent')}.invert, menu_item.target), include_blank: true, class: 'form-control' %>
    </div>

    <%= r = {html: "", menu_item: menu_item, nav_menu: nav_menu}; hooks_run("menu_external_form", r); raw(r[:html]); %>
    <!--Sample custom values for external menus using above hook -->
    <!--<input class="form-control translatable" name="options[external_urlll]" value="<%#= menu_item.get_option('external_urlll') %>" />-->

    <div class="text-right">
        <button type="submit" id="add_external_link" class="btn btn-primary"><%= menu_item.new_record? ? t('camaleon_cms.admin.button.add_menu', default: 'Add to Menu') : t('camaleon_cms.admin.button.update_menu', default: 'Update Menu') %> <i class="fa fa-arrow-right"></i></button>
    </div>
<% end %>